package com.design.cjm.structural.adapter.example2;

/**
 * wrapper通常称为包装类
 *
 * @Author: Jie Ming Chen
 * @Date: 2018/9/26
 * @Version 1.0
 */
public class Wrapper implements Targetable{

    private Source source;

    public Wrapper(Source source) {
        this.source = source;
    }

    @Override
    public void method1() {

        source.method1();
    }

    @Override
    public void method2() {

        System.out.println("这是目标方法");
    }
}
